<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:h="http://java.sun.com/jsf/html"
	  xmlns:f="http://java.sun.com/jsf/core"
	  xmlns:c="http://java.sun.com/jsp/jstl/core">

<h:head>
  <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>BEK - Administração</title>
    <!-- Core CSS - Include with every page -->
    <h:outputStylesheet library="bootstrap/assets/plugins/bootstrap" name="bootstrap.css"  />
    <h:outputStylesheet name="bootstrap/assets/font-awesome/css/font-awesome.css" />
    <h:outputStylesheet library="bootstrap/assets/plugins/pace" name="pace-theme-big-counter.css"  />
    <h:outputStylesheet library="bootstrap/assets/css" name="style.css"  />
    <h:outputStylesheet library="bootstrap/assets/css" name="main-style.css"  />

</h:head>

<h:body class="body-Login-back">

    <div class="container">
       
        <div class="row">
            <div class="col-md-4 col-md-offset-4 text-center logo-margin ">
	            <span class="label label-success">B</span>
	            <span class="label label-danger">E</span>
	            <span class="label label-info">K</span>
	            <span class="label label-primary">Administração</span>
            </div>
            <div class="col-md-4 col-md-offset-4">
                <div class="login-panel panel panel-default">                  
                    <div class="panel-heading">
                        <h3 class="panel-title">Por favor, faça login</h3>
                    </div>
                    <div class="panel-body">
                        <form id="login" method="post" action="#{request.contextPath}/j_spring_security_check" >
                        
	                        	<h:panelGroup rendered="#{!empty param.login_error}">
	                        	
	                        		<div class="alert alert-danger">Erro ao efetuar login!</div>
									<!-- Motivo: #{SPRING_SECURITY_LAST_EXCEPTION.message} -->
								</h:panelGroup>
                        
                        
	                            <fieldset>
	                                <div class="form-group">
	                                    <input type="text" id="j_username" class="form-control" name="j_username" placeholder="Username"  />
	                                </div>
	                                <div class="form-group">
	                                    <input type="password" id="j_password" class="form-control" name="j_password" placeholder="Password" />
	                                </div>
	                                <div class="form-group">
				     					<label class="checkbox">
				      						<input type="checkbox" name="_spring_security_remember_me" /> Entrar automaticamente
				      					</label>
			      					</div>
	                                
		                            <div class="form-group">
				      					<button type="submit" name="submit" class="btn btn-lg btn-success btn-block">Entrar</button>
				      				</div>
				      
							       <script>
										document.getElementById("login").j_username.value = "#{SPRING_SECURITY_LAST_USERNAME}";
									</script>
	                                
	                         	</fieldset>
                    	</form>
                    </div>
        		</div>
     		</div>
        </div>
    </div>

     <!-- Core Scripts - Include with every page -->
    <h:outputScript library="bootstrap/assets/plugins" name="jquery-1.10.2.js"/>
    <h:outputScript library="bootstrap/assets/plugins/bootstrap" name="bootstrap.min.js"/>
    <h:outputScript library="bootstrap/assets/plugins/metisMenu" name="jquery.metisMenu.js"/>
    
</h:body>

</html>
